Trim

The last function we will look at in this section is the Trim function.  This function is particularly useful if we are importing data from a text file or from a word processing program.  

A phrase appears in row sixteen of the Text tab of the Funexam worksheet.  This phrase reads A new millennium.   At first look you may not notice that there are several extra spaces in this phrase.  The spaces between new and millennium are apparent, however, the spaces at the beginning and end of the phrase might not be so apparent.

Note:  In order to determine if there are extra spaces at the end of a cell, click within the cell and hit the End key on your keyboard.  Notice the location of the cursor.  If it appears next to the last letter in the cell, you can be certain that there are no extra spaces at the end of the cell.  However, a space between the cursor and the last character indicates an extra space.  

You can use the trim function to remove the extra spaces in your text.

Skill Builder:  Using the Trim Function 

1.	Click 	In the Cell where you want the newly formatted text to 
		appear.

2.	Type	The Function.  In this case the function is 
		
		=trim(cell address of text you want trimmed)

		For example, if you wanted to remove all extra spaces 
		in cell A2, you would use the formula:  
		=trim(A2

3.  	Press	Enter.  When you press enter the newly spaced text 
		will appear.

Skill Builder:  Converting Text to a Value

Once you have trimmed your text, you will need to convert your new text to a value.

1.	Click	On the Cell with the text you wish to convert.

2.	Click 	On the Copy button. 

3.	Select	Edit/Paste Special… 

4.	Click	On the Values option.